module dogre.utils;

//Not included in dogre.ogremain.

import std.exception : enforce;

string Wrapper()  //Intended to be mixin
{
    return `private void* _p;
    
    @property void* p() //Get the pointer.
    {
        return enforce(_p, "This wrapper has a null pointer!");
    }
    
    @property protected void p(void* ptr)
    {
        _p = enforce(ptr, "The wrapper's pointer was set to a null pointer!");
    }
    
    this(void* ptr)  //Creation of wrapper constructor
    {
        _p = enforce(ptr, "Tried to wrap a null pointer!");
    }`;
}





//A universal interface for Radian and Degree classes to implement
interface AngleMeasurement
{
    void* asRadians();  //Very simple
}